package com.xzc.one.business.controller.web;


import com.xzc.one.business.service.web.UserService;
import com.xzc.one.common.inout.Param;
import com.xzc.one.common.inout.ResponseBody;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author xzc
 * @since 2020-07-04
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    UserService userService;

    @RequestMapping("/get")
    public ResponseBody get() {
        return ResponseBody.success(userService.get());
    }

    @RequestMapping("/list")
    public ResponseBody list() {
        return ResponseBody.success(userService.list());
    }

    @RequestMapping("/page")
    public ResponseBody page(@RequestBody Param p) {
        return ResponseBody.success(userService.page(p));
    }
}

